<%-- 
    Document   : header
    Created on : Dec 9, 2013, 8:27:56 AM
    Author     : brlnt
--%>

<%@page import="model.UserBean"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">

        <title>${title} | SIPERANAS</title>

        <!-- Bootstrap core CSS -->
        <link href="${initParam.css}/bootstrap.css" rel="stylesheet">
        <link href="${initParam.css}/bootstrap-responsive.min.css" rel="stylesheet">

        <!-- Add custom CSS here -->
        <link href="${initParam.css}/stylish-portfolio.css" rel="stylesheet">
        <link href="${initParam.fontaw}/css/font-awesome.min.css" rel="stylesheet">
        <link href="${initParam.css}/custom.css" rel="stylesheet">

        <!-- JavaScript -->
        <script src="${initParam.js}/jquery-1.10.2.js"></script>
        <script src="${initParam.js}/bootstrap.js"></script>

    </head>
    <body>
<% UserBean ub;
    ub = (UserBean) session.getAttribute("sesiUser");
%>
        <nav class="navbar navbar-fixed-top navbar-siperanas" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="./home">SIPERANAS</a>
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="./home">Home</a></li>
                        <li><a href="artikel">Artikel</a></li>
<% if (ub != null) { // kalau sudah login%>
    <% if(ub.getRole() == 3 || ub.getRole() == 4) { // kontributor & masyarakat %>
                        <li><a href="pelaporan">Pelaporan</a></li>
    <% } %>
    <% if(ub.getRole() == 2) { //validator %>
                        <li><a href="pelaporan?action=validasi">Validasi</a></li>
                        <li><a href="pelaporan?action=progress">Progress</a></li>
    <% } %>
                        <!-- li class="dropdown">
                            <a href="./artikel" class="dropdown-toggle" data-toggle="dropdown">Artikel <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="#">Action</a></li>
                                <li><a href="#">Another action</a></li>
                                <li><a href="#">Something else here</a></li>
                                <li class="divider"></li>
                                <li class="dropdown-header">Nav header</li>
                                <li><a href="#">Separated link</a></li>
                                <li><a href="#">One more separated link</a></li>
                            </ul>
                        </li -->
    <% if(ub.getRole() == 1) { //admin %>
                        <li><a href="kelola_akun">Kelola User</a></li>
    <% } %>

                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hai, <%=ub.getFirstName()%> ! <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="./akun">Edit Akun</a></li>
                                <li><a href="./logout"><i class="glyphicon glyphicon-log-out"></i> Logout</a></li>
                                <!-- li><a href="#">Something else here</a></li>
                                <li class="divider"></li>
                                <li class="dropdown-header">Nav header</li>
                                <li><a href="#">Separated link</a></li>
                                <li><a href="#">One more separated link</a></li -->
                            </ul>
                        </li>
<% } else { // kalau belum login %>
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <li><a href="login"><i class="glyphicon glyphicon-log-in"></i> Login</a></li>
<% } %>
                    </ul>
                </div><!--/.nav-collapse -->
            </div>
        </div>
    </nav>
    <!-- div class="row" -->
    <div class="siperanas-body">
        